package com.zhaopin.tree;

/**
 * @author yin.peide
 * @date 2021-06-17 11:24
 */
class TreeNode {

    private int value;
    private TreeNode left;
    private TreeNode right;

    public void init (TreeNode left,TreeNode right){
        setLeft(left);
        setRight(right);
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public TreeNode getLeft() {
        return left;
    }

    public void setLeft(TreeNode left) {
        this.left = left;
    }

    public TreeNode getRight() {
        return right;
    }

    public void setRight(TreeNode right) {
        this.right = right;
    }

    TreeNode(int x) {
        value = x;
    }
}
